package cn.wolfcode.rbac.domain;

import com.alibaba.fastjson.JSON;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;

@Data @NoArgsConstructor @AllArgsConstructor
public class Customer extends BaseDomain {
    private String name;
    private Integer age;
    private String displayGender;//显示性别
    private Integer gender;//性别
    private String tel;
    private String qq;
    private Long jobId;
    private String job;
    private Long sourceId;
    private String source;//来源
    private Integer status;//状态
    private String displayStatus;//显示状态
    private Long sellerId;
    private String seller;//市场专员

    public String getJson(){
        HashMap map = new HashMap();
        map.put("id",id);
        map.put("name",name);
        map.put("age",age);
        map.put("gender",gender);
        map.put("tel",tel);
        map.put("qq",qq);
        map.put("jobId",jobId);
        map.put("sourceId",sourceId);
        map.put("sellerId",sellerId);
        map.put("seller",seller);
        return JSON.toJSONString(map);
    }

    public Customer(Long id, String name, Integer age, String displayGender, Integer gender, String tel, String qq, Long jobId, String job, Long sourceId, String source, Integer status, String displayStatus, Long sellerId, String seller) {
        super(id);
        this.name = name;
        this.age = age;
        this.displayGender = displayGender;
        this.gender = gender;
        this.tel = tel;
        this.qq = qq;
        this.jobId = jobId;
        this.job = job;
        this.sourceId = sourceId;
        this.source = source;
        this.status = status;
        this.displayStatus = displayStatus;
        this.sellerId = sellerId;
        this.seller = seller;
    }

    @Override
    public String toString() {
        return "Customer{" +
                "id=" + id +
                ",name='" + name + '\'' +
                ", age=" + age +
                ", displayGender='" + displayGender + '\'' +
                ", gender=" + gender +
                ", tel='" + tel + '\'' +
                ", qq='" + qq + '\'' +
                ", job='" + job + '\'' +
                ", source='" + source + '\'' +
                ", status=" + status +
                ", displayStatus='" + displayStatus + '\'' +
                ", seller='" + seller +
                '}';
    }
}
